<?
//inculde即可以使用data数据。本页所有的data数据，倾在controller都处理好
include_once("../../../common/module/checkA.php");
include_once("../../../../config.php");
include_once("../controller/detail-edit.php");
?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <?php include ROOT_PATH_.'/controller/common/module/head.php'; ?>
    <?php include 'modules/head.php'; ?>
</head>

<body>

<div id="topbar">   <?php include ROOT_PATH_.'/controller/common/module/topbar.php'; ?></div>

<div id="container" class="<? echo $system_part ?>">

    <div id="maincontent">

        <div id="sidebar">
            <?php include ROOT_PATH_.'/controller/common/module/sidebar.php'; ?>
        </div>


<div id="content" class="layui-form">
<h1> 编辑单位:<? echo $detail['name']?> 信息 </h1>

<div class="detail-box member-edit-box layui-form" >

<div class="detail-boxes" >
<ul class="detail-boxing"> 



<form id="edit-member-form" method="post" action="detail-edit-function.php?nav-itemed=member&nowpageid=<?echo $_GET["nowpageid"]?>" enctype="multipart/form-data" class="layui-form">
 
  
 <input type="hidden" name="nid" value="<? echo $detail['nid']?>">


    <div style="display: flex;">

   <div style="width: 40%;">

  <div class="layui-form-item">
    <label class="layui-form-label">名称</label>
    <div class="layui-input-block">
      <input type="text" name="ai_name" required  lay-verify="required" placeholder="请输入名字" autocomplete="off" class="layui-input" value="<? echo $detail['name']?>">
    </div>
  </div>
  
    <div class="layui-form-item">
    <label class="layui-form-label">简称</label>
    <div class="layui-input-block">
      <input type="text" name="ai_sname" required  lay-verify="required" placeholder="请输入名字" autocomplete="off" class="layui-input" value="<? echo $detail['sname']?>">
    </div>
  </div>

       <div class="layui-form-item icon">

           <label class="layui-form-label">图片：</label>

           <div class="layui-input-block">
               <div class="image">
                   <?php
                   if ($detail['icon'] != 'alpha.gif' && $detail['icon'] != '') {
                       ?>
                       <img src="<?
                       if ($detail_storage) {
                           echo $detail_storage;
                       } else {
                           echo $site_domin;
                       }
                       ?>/uploadfiles/<? echo $theme_folder ?>/<? echo $detail['icon'] ?>" width="100"/>
                   <?php } ?>
               </div>
               <a href="detail-delete-img.php?nid=<?php echo $trans_nid ?>&img=icon&sys_part=<? echo $system_part ?>">删除</a>
               <span class="title-data">(请上传像素<? echo $first_icon_data[0] ?>X<? echo $first_icon_data[1] ?>的图片,格式为jpeg)</span>
           </div>
       </div>

       <div class="layui-form-item icon">
           <label class="layui-form-label"> </label>
           <div class="layui-input-block">   <input type="file" name="icon" onchange="fileChange(this);"/></div><em class="explain">(上传列表图标)</em></div>


    <div class="layui-form-item">
        <label class="layui-form-label">企业识别码</label>
        <div class="layui-input-block">
            <input type="text" name="ai_idnumber" autocomplete="off" class="layui-input" value="<? echo $detail['idnumber']?>">
        </div>
    </div>


       <div class="layui-form-item">
           <label class="layui-form-label">企业类型</label>
           <div class="layui-input-block">
               <select name="ai_type"  lay-search="">
                   <option value="<? echo $detail['type']?>"><? echo $detail['type'] ?></option>
                   <option value="其他">其他</option>
                   <option value="个人">个人</option>
                   <option value="政府">政府</option>
                   <option value="个体户">个体户</option>
                   <option value="事业单位">事业单位</option>
                   <option value="私企">私企</option>
                   <option value="国企">国企</option>
                   <option value="集体所有制 ">集体所有制</option>
               </select>
           </div>
       </div>



       <div class="layui-form-item">
           <label class="layui-form-label">行业类型</label>
           <div class="layui-input-block" >
               <? foreach ($industry_type_array as $k => $v){?>
                   <input type="checkbox" name="ai_industry_type[]"  value="<?echo $v?>"     title="<?echo $v?>"
                       <? if(in_array($v,$now_industry_type_array))   {echo "checked";} ?>

                       >
                   <?;}?>
           </div>

       </div>



    <div class="layui-form-item">
        <label class="layui-form-label">联系电话</label>
        <div class="layui-input-block">
            <input type="text" name="ai_phone" autocomplete="off" class="layui-input" value="<? echo $detail['phone']?>">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">法人</label>
        <div class="layui-input-block">
            <input type="text" name="ai_faren" autocomplete="off" class="layui-input" value="<? echo $detail['faren']?>">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">传真</label>
        <div class="layui-input-block">
            <input type="text" name="ai_fax" autocomplete="off" class="layui-input" value="<? echo $detail['fax']?>">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">地址</label>
        <div class="layui-input-block">
            <input type="text" name="ai_address" autocomplete="off" class="layui-input" value="<? echo $detail['address']?>">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">头衔</label>
        <div class="layui-input-block">
            <input type="text" name="ai_position" autocomplete="off" class="layui-input" value="<? echo $detail['position']?>">
        </div>
    </div>





    <div class="layui-form-item">
        <label class="layui-form-label">邮箱</label>
        <div class="layui-input-block">
            <input type="text" name="ai_email"   autocomplete="off" class="layui-input" value="<? echo $detail['email']?>">
        </div>
    </div>


    <?
    $ageant_list=select_lines_all_items($table_Prefix."member","nid desc","","0");
    $agent=select_one_line_all_items($table_Prefix."member","nid = '".$detail['informant']."'");
    ?>

    <div class="layui-form-item">
        <label class="layui-form-label">介绍人</label>
        <div class="layui-input-block">
            <select name="ai_informant"  lay-search="" >
                <option value="<? echo $detail['informant']?>"><? echo $detail['informant']." : ".$agent['name']?></option>
                <option value="">无</option>
                <? for($i=0;$i<count($ageant_list);$i++){ ?>
                    <option value="<? echo $ageant_list[$i]['nid'] ?>"><? echo $ageant_list[$i]['nid'] ?> : <? echo $ageant_list[$i]['name'] ?></option>
                <? } ?>
            </select>
        </div>
    </div>

       <?
       $developer_list=select_lines_all_items($table_Prefix."employee","nid desc","","0");
       $developer=select_one_line_all_items($table_Prefix."employee","nid = '".$detail['developer']."'");
       ?>

       <div class="layui-form-item">
           <label class="layui-form-label">开发者</label>
           <div class="layui-input-block">
               <select name="ai_developer"  lay-search="" >
                   <option value="<? echo $detail['developer']?>"><? echo $detail['developer']." : ".$developer['name']?></option>
                   <option value="">无</option>
                   <? for($i=0;$i<count($developer_list);$i++){ ?>
                       <option value="<? echo $developer_list[$i]['nid'] ?>"><? echo $developer_list[$i]['nid'] ?> : <? echo $developer_list[$i]['name'] ?></option>
                   <? } ?>
               </select>
           </div>
       </div>





    <div class="layui-form-item">
        <label class="layui-form-label">好感度</label>
        <div class="layui-input-block" >
        <input type="radio" name="ai_favourable"  value="友好"     title="友好"      <? if($detail['favourable']=="友好")   {echo "checked";} ?>>
        <input type="radio" name="ai_favourable"  value="互相仇恨"  title="互相仇恨"  <? if($detail['favourable']=="互相仇恨"){echo "checked";} ?>>
        <input type="radio" name="ai_favourable"  value="仇视我方"  title="仇视我方"  <? if($detail['favourable']=="仇视我方"){echo "checked";} ?>>
        <input type="radio" name="ai_favourable"  value="我方仇视"  title="我方仇视"  <? if($detail['favourable']=="我方仇视"){echo "checked";} ?>>
        <input type="radio" name="ai_favourable"  value="我方不满"  title="我方不满"  <? if($detail['favourable']=="我方不满"){echo "checked";} ?>>
        <input type="radio" name="ai_favourable"  value="不满我方"  title="不满我方"  <? if($detail['favourable']=="不满我方"){echo "checked";} ?>>
        <input type="radio" name="ai_favourable"  value="普通"     title="普通"      <? if($detail['favourable']=="普通")    {echo "checked";} ?>>
        <input type="radio" name="ai_favourable"  value="黑名单"     title="黑名单"      <? if($detail['favourable']=="黑名单")    {echo "checked";} ?>>
        </div>

    </div>



    <div class="layui-form-item">
        <label class="layui-form-label">关系</label>

        <div class="layui-input-block" >
            <input type="radio" name="ai_relation"  value="客户"     title="客户"      <? if($detail['relation']=="客户")   {echo "checked";} ?>>
            <input type="radio" name="ai_relation"  value="目标客户"  title="目标客户"  <? if($detail['relation']=="目标客户"){echo "checked";} ?>>
            <input type="radio" name="ai_relation"  value="供应商"  title="供应商"  <? if($detail['relation']=="供应商"){echo "checked";} ?>>
            <input type="radio" name="ai_relation"  value="同行"  title="同行"        <? if($detail['relation']=="同行"){echo "checked";} ?>>
            <input type="radio" name="ai_relation"  value="无"     title="无"      <? if($detail['relation']=="无")    {echo "checked";} ?>>
        </div>


    </div>





    <div class="layui-form-item">
        <label class="layui-form-label">状态</label>

        <div class="layui-input-block" >

            <input type="radio" name="ai_status"  value="正常"  title="正常"  <? if($detail['status']=="正常"){echo "checked";} ?>>
            <input type="radio" name="ai_status"  value="结业"  title="结业"  <? if($detail['status']=="结业"){echo "checked";} ?>>

        </div>


    </div>




    <div class="layui-form-item">
        <label class="layui-form-label">网站1</label>
        <div class="layui-input-block">
            <input type="text" name="ai_website1" autocomplete="off" class="layui-input" value="<? echo $detail['website1']?>">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">网站2</label>
        <div class="layui-input-block">
            <input type="text" name="ai_website2" autocomplete="off" class="layui-input" value="<? echo $detail['website2']?>">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">网站3</label>
        <div class="layui-input-block">
            <input type="text" name="ai_website3" autocomplete="off" class="layui-input" value="<? echo $detail['website3']?>">
        </div>
    </div>
<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">网站4</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="text" name="ai_website4" autocomplete="off" class="layui-input" value="--><?// echo $detail['website4']?><!--">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">网站5</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="text" name="ai_website5" autocomplete="off" class="layui-input" value="--><?// echo $detail['website5']?><!--">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">网站6</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="text" name="ai_website6" autocomplete="off" class="layui-input" value="--><?// echo $detail['website6']?><!--">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">网站7</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="text" name="ai_website7" autocomplete="off" class="layui-input" value="--><?// echo $detail['website7']?><!--">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">网站8</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="text" name="ai_website8" autocomplete="off" class="layui-input" value="--><?// echo $detail['website8']?><!--">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">网站9</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="text" name="ai_website9" autocomplete="off" class="layui-input" value="--><?// echo $detail['website9']?><!--">-->
<!--        </div>-->
<!--    </div>-->

       <div class="layui-form-item">
           <label class="layui-form-label">阿里巴巴1</label>
           <div class="layui-input-block">
               <input type="text" name="ai_alibaba1" autocomplete="off" class="layui-input" value="<? echo $detail['alibaba1']?>">
           </div>
       </div>
       <div class="layui-form-item">
           <label class="layui-form-label">阿里巴巴2</label>
           <div class="layui-input-block">
               <input type="text" name="ai_alibaba2" autocomplete="off" class="layui-input" value="<? echo $detail['alibaba2']?>">
           </div>
       </div>
       <div class="layui-form-item">
           <label class="layui-form-label">阿里巴巴3</label>
           <div class="layui-input-block">
               <input type="text" name="ai_alibaba3" autocomplete="off" class="layui-input" value="<? echo $detail['alibaba3']?>">
           </div>
       </div>



<!--       -->
<!---->
<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">微信公众号1</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="text" name="ai_wechat1" autocomplete="off" class="layui-input" value="--><?// echo $detail['wechat1']?><!--">-->
<!--        </div>-->
<!--    </div>-->
<!---->
<!---->
<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">微信公众号2</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="text" name="ai_wechat2" autocomplete="off" class="layui-input" value="--><?// echo $detail['wechat2']?><!--">-->
<!--        </div>-->
<!--    </div>-->
<!---->
<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">微信公众号3</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="text" name="ai_wechat3" autocomplete="off" class="layui-input" value="--><?// echo $detail['wechat3']?><!--">-->
<!--        </div>-->
<!--    </div>-->

<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">微信公众号4</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="text" name="ai_wechat4" autocomplete="off" class="layui-input" value="--><?// echo $detail['wechat4']?><!--">-->
<!--        </div>-->
<!--    </div>-->
<!---->
<!---->
<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">微信公众号5</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="text" name="ai_wechat5" autocomplete="off" class="layui-input" value="--><?// echo $detail['wechat5']?><!--">-->
<!--        </div>-->
<!--    </div>-->






    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">备注</label>
        <div class="layui-input-block">
            <textarea name="ai_remark" placeholder="备注" class="layui-textarea"><? echo $detail['remark']?></textarea>
        </div>
    </div>



   </div>
    <!-- 修改历史 -->
    <div style="margin-left: 5%;width: 40%;">
        <textarea name="content" placeholder="修改备注" class="layui-textarea"></textarea>


        <div style="overflow-y:auto;height: 600px;margin-top:50px;">
            <?
            for($i=0;$i<count($detail_history);$i++){ ?>
                <div style="font-size: 20px; margin-bottom:20px;padding:15px;background: #F0F0F0;word-wrap: break-word;
word-break: break-all;
overflow: hidden;">
                    <div><? echo $detail_history[$i]['content']; ?></div>
                    <div style="text-align: right;font-size: 14px;">修改人：<? echo $detail_history[$i]['authur']; ?></div>
                    <div style="text-align: right;font-size: 14px;"><? echo $detail_history[$i]['modifytime']; ?></div>

                </div>
            <? } ?>
        </div>


    </div>


    </div>


    <!--    <div class="layui-form-item">-->
<!--    <div class="layui-input-block">-->
<!--      <button class="layui-btn" lay-submit lay-filter="formMemberAdd" type="submit">立即提交</button>-->
<!--      <button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
<!--    </div>-->
<!--  </div>-->

    <div class="function">
        <button class="layui-btn" lay-submit lay-filter="formMemberAdd" type="submit">立即提交</button>
        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>

    <input name="nid" type="hidden" value="<? echo $detail['nid']?>"/>
<input name="navitemed" type="hidden" value="<? echo $_REQUEST['nav-itemed'] ?>"/>
<input name="sys_part" type="hidden" value="<? echo $system_part ?>"/>
<input name="nowpageid" type="hidden" value="<? echo $_REQUEST['nowpageid'] ?>"/>
<input name="sortby" type="hidden" value="<? echo $_REQUEST['sortby'] ?>"/>
<input name="term_nid" type="hidden" value="<? echo $_REQUEST['term_nid'] ?>"/>


 
</form>



</ul>




<!--content端點01-->
</div>
<!--maincontent端點01-->
<br class="clearfloat"/>
</div>
<!--container端點01-->
</div>


<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?> </body>
</html>
